package sort;

import java.util.Arrays;

/**
 * Created by Administrator on 2018/2/27 0027.
 */
public class SelectSort
{
    public static void main(String[] args)
    {
        int[] NUMBERS = {49, 38, 65, 97, 76, 13, 27, 78, 34, 12, 64, 5, 4, 62, 99, 98, 54, 56, 17, 18, 23, 34, 15, 35, 25, 53, 51};
        sort(NUMBERS);
        System.out.println(Arrays.toString(NUMBERS));
    }

    private static void sort(int[] src)
    {
        int tmp = 0;
        for(int i = 0; i < src.length - 1 ; i++)
        {
            for(int j = i + 1; j < src.length;j ++)
            {
                if(src[j] < src[i])
                {
                    tmp = src[i];
                    src[i] = src[j];
                    src[j] = tmp;
                }
            }
        }
    }
}
